Gazebo garden
Table of Content
Gazebo garden#
ROS2 Bridge#
install#
build from source#
Install steps from github instruction

very important
export GZ_VERSION=garden
clone humble branch
# Setup the workspace
mkdir -p ~/ws/src
cd ~/ws/src
# Download needed software
git clone https://github.com/gazebosim/ros_gz.git -b humble
prepared and build
cd ~/ws
rosdep install -r --from-paths src -i -y --rosdistro humble
source /opt/ros/humble/setup.zsh
cd ~/ws
colcon build
actuator_msgs
if the build process or running bridge failed with this message
error while loading shared libraries: libactuator_msgs__rosidl_typesupport_cpp.so
check github install
Demo#
Run Bridge with simple topic contain Int32 msg
Tip
cd ~/ws
source install/setup.zsh
- Send msgs from ros to gz
- Send msgs from gz to ros
run bridge
ros2 run ros_gz_bridge parameter_bridge \
/keyboard/keypress@std_msgs/msg/Int32@gz.msgs.Int32
Ros as publisher#
ros pub
ros2 topic pub /keyboard/keypress std_msgs/msg/Int32 "{data: 100}"
gz echo (subscriber)
gz topic -e -t /keyboard/keypress
ROS as subscriber#
ros2 topic echo /keyboard/keypress
gz as publisher
gz topic \
-t /keyboard/keypress \
-m gz.msgs.Int32 \
-p 'data: 200'
Warning